import React from 'react';
var TextForOptionsValue = function TextForOptionsValue(_ref) {
  var value = _ref.value,
    fieldNames = _ref.fieldNames;
  var _ref2 = fieldNames || {},
    _ref2$value = _ref2.value,
    labelKey = _ref2$value === void 0 ? 'label' : _ref2$value;
  // @ts-ignore
  var texts =
    value === null || value === void 0
      ? void 0
      : value.map(function (val) {
          return val[labelKey];
        });
  return /*#__PURE__*/ React.createElement(
    'span',
    {
      className: 'szzj-form-detail-options',
    },
    texts === null || texts === void 0 ? void 0 : texts.join(','),
  );
};
export default TextForOptionsValue;
